package javaclass;

import java.util.Random;

/*
* 生成一个随机数
* */
public class DemoRandom {
    public static void main(DemoString[] args) {
        int num =   5;
        Random r =new Random();
        for (int i = 0; i <100 ; i++) {
            int result =r.nextInt(num)+1;
            System.out.println(result);
        }

    }
}
